package com.aiyige.page.publish.photo.adapter;

import android.view.View;
import android.widget.TextView;

import com.aiyige.R;
import com.aiyige.page.interest.model.Interest;
import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.BaseViewHolder;

import java.util.LinkedList;

import butterknife.BindView;
import butterknife.ButterKnife;

public class InterestAdapter extends BaseQuickAdapter<Interest, InterestAdapter.ViewHolder> {
    public InterestAdapter() {
        super(R.layout.interest_display_item, new LinkedList<Interest>());
    }

    @Override
    protected void convert(ViewHolder helper, Interest item) {
        helper.bindData(item);
    }

    class ViewHolder extends BaseViewHolder {
        @BindView(R.id.itemTv)
        TextView itemTv;

        public ViewHolder(View view) {
            super(view);
            ButterKnife.bind(this, view);
        }

        public void bindData(Interest data) {
            itemTv.setText("#" + data.getTitle());
        }
    }
}
